<?php
namespace app\admin\validate;

class UserValidate extends AdminValidate
{
	protected $rule = [
		'account' => 'require|max:25|chsAlphaNum',
		'passwd' => 'require|length:6,20|checkPasswd',
		'mobile' => 'require|mobile',
		'email' => 'email',
		'nickname' => 'require|max:50',
		'captcha'=>'require|checkCaptcha',
	];
	
	protected $message = [
		'account.require' => '请输入账号',
		'account.max' => '账号不得超过25位字符',
		'account.chsAlphaNum' => '账号只能是汉字、字母和数字',
		'passwd.require' => '请输入密码',
		'passwd.length' => '密码长度不得小于6位且不得大鱼20位',
		'mobile.require' => '请输入手机号码',
		'mobile.mobile' => '手机号码格式错误',
		'email.email' => '邮箱格式错误',
		'nickname.require' =>'请输入昵称',
		'nickname.max' => '昵称不得超过50个字符',
		'captcha.require' => '请输入验证码',
	];
	
	protected $scene = [
		'login' => ['account','passwd','captcha']
	];
}

